/****************************************************************************
 *                                                                                    
 * Copyright (c) 2005 - 2007 Winbond Electronics Corp. All rights reserved.           
 *                                                                                    
 ***************************************************************************/
 
/****************************************************************************
 * FILENAME
 *     Ide.h
 *
 * VERSION
 *     1.0
 *
 * DESCRIPTION
 *     The header file for ATAPI Interface Controller.
 * **************************************************************************/
 
#ifndef _IDE_H_
#define _IDE_H_

#define ATAPI_CLK_33MHZ	0
#define ATAPI_CLK_66MHZ	1

#define ATAPI_MASTER	0
#define ATAPI_SLAVE		1

/* API functions */
INT atapiInit(INT ATAPI_EngineCLK);
INT atapiOpen(VOID);
INT atapiIoctl(INT32 atapiMasterSlave, UINT32 atapiCommand, UINT32 atapiArg);
INT atapiRead(UCHAR atapiDriveNo, UINT32 DMAStartAddr, UINT32 startLBA,  USHORT count);
INT atapiWrite(UCHAR atapiDriveNo, UINT32 DMAStartAddr, UINT32 startLBA,  USHORT count);

/* IO control commands */
#define ATAPI_GET_CAPACITY				1
#define ATAPI_SET_SCATTERGATHER_DMA		2
#define ATAPI_RESET_DEVICE				3
#define ATAPI_GET_UDMAMODE_INFO			4

#endif /* End of _IDE_H_ */